package com.miaoquan.mqportal.feign;

import com.miaoquan.mqapitbk.domain.request.TklCreateRequest;
import com.miaoquan.mqcommon.api.CommonResult;
import com.miaoquan.mqcommon.exception.ApiException;
import com.miaoquan.mqportal.feign.hystrix.TklFeignFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author Fa
 * @date 2020-04-03 21:25
 */
@FeignClient(name = "mq-api-tbk", contextId = "tklFeign", path = "/tkl",
        fallbackFactory = TklFeignFactory.class
)
public interface TklFeign {

    /**
     * 创建淘口令
     */
    @RequestMapping(value = "/create", method = RequestMethod.POST)
    CommonResult<String> createTkl(
            @RequestBody TklCreateRequest tklCreateRequest
    ) throws ApiException;

}

